<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 在线命令表 基类
 * @Entity
 * @Table(name="fa_command", id={"id"})
 * @DDL("CREATE TABLE `fa_command` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` varchar(30) NOT NULL DEFAULT '' COMMENT '类型',
  `params` varchar(1500) NOT NULL DEFAULT '' COMMENT '参数',
  `command` varchar(1500) NOT NULL DEFAULT '' COMMENT '命令',
  `content` text COMMENT '返回结果',
  `executetime` int(10) unsigned DEFAULT NULL COMMENT '执行时间',
  `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  `status` enum('successed','failured') NOT NULL DEFAULT 'failured' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线命令表'")
 * @property int $id ID
 * @property string $type 类型
 * @property string $params 参数
 * @property string $command 命令
 * @property string $content 返回结果
 * @property int $executetime 执行时间
 * @property int $createtime 创建时间
 * @property int $updatetime 更新时间
 * @property string $status 状态
 */
abstract class CommandBase extends Model
{
    /**
     * ID
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id - ID
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id - ID
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 类型
     * type
     * @Column(name="type", type="varchar", length=30, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - 类型
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - 类型
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * 参数
     * params
     * @Column(name="params", type="varchar", length=1500, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $params;

    /**
     * 获取 params - 参数
     *
     * @return string
     */ 
    public function getParams()
    {
        return $this->params;
    }

    /**
     * 赋值 params - 参数
     * @param string $params params
     * @return static
     */ 
    public function setParams($params)
    {
        $this->params = $params;
        return $this;
    }

    /**
     * 命令
     * command
     * @Column(name="command", type="varchar", length=1500, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $command;

    /**
     * 获取 command - 命令
     *
     * @return string
     */ 
    public function getCommand()
    {
        return $this->command;
    }

    /**
     * 赋值 command - 命令
     * @param string $command command
     * @return static
     */ 
    public function setCommand($command)
    {
        $this->command = $command;
        return $this;
    }

    /**
     * 返回结果
     * content
     * @Column(name="content", type="text", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $content;

    /**
     * 获取 content - 返回结果
     *
     * @return string
     */ 
    public function getContent()
    {
        return $this->content;
    }

    /**
     * 赋值 content - 返回结果
     * @param string $content content
     * @return static
     */ 
    public function setContent($content)
    {
        $this->content = $content;
        return $this;
    }

    /**
     * 执行时间
     * executetime
     * @Column(name="executetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $executetime;

    /**
     * 获取 executetime - 执行时间
     *
     * @return int
     */ 
    public function getExecutetime()
    {
        return $this->executetime;
    }

    /**
     * 赋值 executetime - 执行时间
     * @param int $executetime executetime
     * @return static
     */ 
    public function setExecutetime($executetime)
    {
        $this->executetime = $executetime;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 状态
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=false, default="failured", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

}
